package cn.xiuxius.askbox.pojo.dto.common;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LoginDTO {
    @NotBlank(message = "用户名不能为空")
    private String username;
    @NotBlank(message = "密码不能为空")
    private String password;
    @NotBlank(message = "验证码Key不能为空")
    private String captchaKey;
    @NotBlank(message = "验证码不能为空")
    @Digits(integer = 2, fraction = 0, message = "验证码格式错误")
    private String captcha;
}
